use "Table12data.dta"
ssc install outreg2
*****************Generate Table 12*******************




ivregress2 2sls log_croptotal (log_AAA = STD9632) if year == 1997, first
est restore first
outreg2 using windrate.tex, cttop(first) replace
est restore second
outreg2 using windrate.tex, append ctitle (TotalCrop1997)



ivregress2 2sls log_croptotal (log_AAA = STD9632) if year == 2002, first
*est restore first
*outreg2 using windrate.tex, cttop(first) replace
*est restore second
outreg2 using windrate.tex, append ctitle (TotalCrop2002)



ivregress2 2sls log_croptotal (log_AAA = STD9632) if year == 2007, first
*est restore first
*outreg2 using windrate.tex, cttop(first) replace
*est restore second
outreg2 using windrate.tex, append ctitle (TotalCrop2007)



ivregress2 2sls log_croptotal (log_AAA = STD9632) if year == 2012, first
*est restore first
*outreg2 using windrate.tex, cttop(first) replace
*est restore second
outreg2 using windrate.tex, append ctitle (TotalCrop2012)



































